package com.hmall.api.client;

import com.hmall.api.config.DefaultFeignConfig;
import com.hmall.api.dto.PayOrderDTO;
import com.hmall.api.fallback.PayClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "pay-service", path = "/pay-orders",
        fallbackFactory = PayClientFallbackFactory.class,
        configuration = DefaultFeignConfig.class
)
public interface PayClient {
    @GetMapping("/biz/{id}")
    PayOrderDTO queryPayOrderDTOByOrderId(@PathVariable("id") Long id);
}